#include "Actor.h"
#include <cstdio>

unsigned int Actor::lastActorId=0;

string Actor::GenerateUniqueName(){
	char newname[13];
	sprintf(newname, "actor-%6i", lastActorId);
	return string(newname);
}

Actor::Actor(const string &name, const string &type){
	this->name = (name == ""?GenerateUniqueName():name);
	lastActorId++;
	isAlive  = true;
	isActive = true;
	isReady =  false;
}

void Actor::SetType(const string &type){
	this->type = type;
}

void Actor::SetName(const string &name){
	this->name = name;
}


const string &Actor::GetType() const{
	return type;
}

const string &Actor::GetName() const{
	return name;
}

void Actor::Kill(){
	isAlive = false;
	isActive= false;
	isReady = false;	
}

void Actor::Update(const float &dt){}
void Actor::Render(sf::RenderWindow &w){}

void Actor::Reset_Actor(){
SetAlive(true);
SetActive(false);
SetReady(false);
}